from wordcloud import WordCloud
import matplotlib as mpl
import matplotlib.pyplot as plt
print(mpl.rcsetup.interactive_bk)

# 词云
str = '''
Quanwei Ruihuan Shida Tang Zhang Wenhui Liu Xi Wenbo Wang Su Yuqing Litong
唐权威 刘瑞欢 王诗达 张文辉 席文博 王丽彤 苏虞清 
TQW WSD ZWH XWB LRH SYQ WLT 
'''

ls = str.split()
print(ls)

# 词云
wc = WordCloud(font_path='/usr/share/fonts/win_fonts/msyhl.ttc',
               background_color='white', width=1000, height=800)
# 词云背景图片
wc.generate(' '.join(ls))
plt.imshow(wc)
plt.axis('off')
plt.show()
